<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@include file= "/WEB-INF/pages/base/commImportPage.jsp" %><html>
<head>
<title>内检测任务历史查询</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<link rel="stylesheet" type="text/css" href="${resourcePath}tags/bootstrap/bootstrap.css">

<link rel="stylesheet" type="text/css" href="${resourcePath}css/comm/Package.css">
<link rel="stylesheet" type="text/css" href="${resourcePath}css/comm/paging.css">
<link rel="stylesheet" type="text/css" href="${resourcePath}css/insp.css"> 
<link rel="stylesheet" type="text/css" href="${resourcePath}tags/laydate/need/laydate.css">
<link rel="stylesheet" type="text/css" href="${resourcePath}tags/laydate/skins/default/laydate.css"> 
<script src="${resourcePath}js/comm/jquery.js"></script>
<script src="${resourcePath}js/comm/build.js"></script>
<script src="${resourcePath}tags/bootstrap/bootstrap.min.js"></script>
<script src="${resourcePath}tags/laydate/laydate.js"></script>
<script src="${resourcePath}tags/dateTag.js"></script>
<script src="${pageContext.request.contextPath}/js/jquery.page.js"></script>
<script src="${pageContext.request.contextPath}/js/insp/task/taskHistory.js"></script>
<script src="${pageContext.request.contextPath}/js/jquery.page.js"></script>
<script src="${pageContext.request.contextPath}/js/insp/inspresult/util.js"></script>
</head>
<body class="body-pad" style="padding-bottom: 100px;">
	<input type="hidden" id="pagePath" value="${pageContext.request.contextPath}"/>
    <input type="hidden" id="resourcePath" value="${resourcePath}"/>
<div class="html-header" style="background-color:white">
   <p class="header-title"><em></em>内检测任务历史查询</p>
</div>
<div class="container-fluid warp insp-container">
    <div class="row-fluid bg-white1">
        <div class="main clearFix">
            <div class="se-bt clearFix">
                <div class="sel w410">
                        <div class="dropdown-list" style="float:left">
                        <div class="drop-list drop-list-min">
                            <div class="checked " style="width:270px;height:28px;" id="lineDiv">
                                <a href="javascript:void(0);" id="gdmc">管道名称</a>
                                <span class="down-span"></span>
                            </div>
                        </div>
                        <ul class="select select-min none" style="width:294px;">
	                        <c:forEach items="${requestScope.pipeLine}" var="line">
	                        	<li onclick="getInspSegment('${line.id}')" ><a href="javascript:void(0);" id="${line.id }" >${line.name}</a></li>
	                        </c:forEach>
                        </ul>
                    </div>
                </div>
                <div class="sel w410">
                    <div class="dropdown-list" style="float:left">
                        <div class="drop-list drop-list-min">
                            <div class="checked " style="width:270px;height:28px;" id="segmentDiv">
                                <a href="javascript:void(0);" id="jcgdmc">检测管段名称</a>
                                <span class="down-span"></span>
                            </div>
                        </div>
                        <ul class="select select-min none" style="width:294px;" id="inspSegment">
                        </ul>
                    </div>
                </div>
                 <div style="clear:both"></div>
                <div class="sel w410">
                   <div class="dropdown-list" style="float:left" data-name='taskId'>
                        <div class="drop-list drop-list-min">
                            <div class="checked " style="width:270px;height:28px;" >
                                <a href="javascript:void(0);" id="jcrwmc">检测任务名称</a>
                                 <span class="down-span"></span>
                            </div>
                        </div>
                        <ul class="select select-min none selectTask" style="width:294px;" >
                        </ul>
                    </div>
                </div>
                <div style="clear:both"></div>
                <div class="sel w410">
                    <span class="nn">创建开始时间:</span>
                    <span class="time" ><input id="begTime" readonly onkeyup="noPermitInput(event,'begTime');" onclick="laydate({format: 'YYYY-MM-DD'})" class="laydate-icon"/><em></em></span>
                </div>
                <div class="sel w410">
                    <span class="nn">创建结束时间:</span>
                    <span class="time" ><input id="endTime" readonly onkeyup="noPermitInput(event,'endTime');" onclick="laydate({format: 'YYYY-MM-DD'})" class="laydate-icon"/><em></em></span>
                </div>
                <a class="btn btn-w100 btn-search-icon btn-h30" id="search"><em></em>查询</a>
            </div>
            <div class="l-r clearFix pad20">
                <div class="left">
                    <div class="info-header clearFix">
                        <ul class="ul-header">
                            <!-- <li class="w5">
                                <span class="Check-Box allBox"><input type="checkbox" name="parentSelect" /></span>
                            </li> -->
                            <li class="w20">任务名称</li>
                            <li class="w10">创建时间</li>
                            <li class="w10">创建人</li>
                            <li class="w20">管道名称</li>
                            <li class="w15">发球时间</li>
                            <li class="w10">状态</li>
                            <li class="w15 no-right">详情</li>
                        </ul>
                        <div id="searchBody">
                     
                        <c:if test="${not empty requestScope.main}">
	                        <c:forEach var="ps" items="${requestScope.main}" varStatus="status">
	                        	<%-- <input type="hidden" value="${ps.ID }"/> --%>
		                        <div class="info-tr" id="${ps.ID }">
		                            <ul class ="<c:if test="${status.index%2 eq 0}">ul-header bg-white</c:if> <c:if test="${status.index%2 ne 0}">ul-header bg-second</c:if>">
		                                <%-- <li class="w5"><span class="Check-Box"><input type="checkbox" id="${ps.ID }" class="${ps.ID }" name="childSelect"/></span></li> --%>
		                                <li class="w20">${(not empty ps.TASKNAME && "" ne fn:trim(ps.TASKNAME)) ? ps.TASKNAME: '-'}</li>
		                                <li class="w10">
		                                	<c:if test="${empty ps.CREATEDATE}">
				                                -
		                                   </c:if>
	                                       <c:if test="${not empty ps.CREATEDATE}">
	                                           <fmt:formatDate value="${ps.CREATEDATE}" pattern="yyyy-MM-dd"/>
	                                       </c:if>
		                                </li>
		                                <li class="w10">${(not empty ps.CREATEUSER && "" ne fn:trim(ps.CREATEUSER)) ? ps.CREATEUSER: '-'}</li>
		                                <li class="w20">${(not empty ps.LINENAME && "" ne fn:trim(ps.LINENAME)) ? ps.LINENAME: '-'}</li>
		                                <li class="w15">
		                                   <c:if test="${empty ps.FROMPIGTIME}">
                                                     -
                                           </c:if>
	                                       <c:if test="${not empty ps.FROMPIGTIME}">
                                                <fmt:formatDate value="${ps.FROMPIGTIME}" pattern="yyyy-MM-dd HH:mm:ss"/>
                                           </c:if>
                                         </li>
		                                <%-- <li class="w10">${(not empty ps.FROMPIG && "" ne fn:trim(ps.FROMPIG)) ? ps.FROMPIG: '-'}</li>
		                                <li class="w10">${(not empty ps.TOPIG && "" ne fn:trim(ps.TOPIG)) ? ps.TOPIG: '-'}</li> --%>
		                                <li class="w10">
		                                	<!-- 状态  -->
		                                	<c:if test="${empty ps.STAUS}">
				                                -
		                                   </c:if>
		                                   <c:if test="${'1' == ps.STAUS}">
				                                                               未发布
		                                   </c:if>
		                                   <c:if test="${'2' == ps.STAUS}">
				                               	已发布
		                                   </c:if>
		                                   <c:if test="${'3' == ps.STAUS}">
				                               	 进行中
		                                   </c:if>
		                                   <c:if test="${'4' == ps.STAUS}">
				                                                                 已完成
		                                   </c:if>
		                                </li>
		                                <li class="w15 no-right">
		                                  <a href="javascript:;" onclick="trackFun('${ps.ID}');" ><img src="${resourcePath}/images/comm/search.png" alt=""/></a>
		                                </li>
		                                <!-- 发球点 -->
		                                <input type="hidden" value="${(not empty ps.FROMPIG && '' ne fn:trim(ps.FROMPIG)) ? ps.FROMPIG: '-'}" />
		                                <!-- 收球点 -->
		                                <input type="hidden" value="${(not empty ps.TOPIG && '' ne fn:trim(ps.TOPIG)) ? ps.TOPIG: '-'}" />
		                                <!-- 检测工具 -->
		                                <input type="hidden" value="${(not empty ps.DETECTIONTOOL && '' ne fn:trim(ps.DETECTIONTOOL)) ? ps.DETECTIONTOOL: '-'}" />
		                            </ul>
		                        </div>
	                        </c:forEach>
                        </c:if>
                        </div>
                    </div>
                    <c:if test="${ empty requestScope.main}"> 
                      		<div class="no-data" id="noDataImg">
                             	<img src="${resourcePath}/images/pig/no-data.png" alt=""/>
                        	</div> 
                        	<div class="paging-footer clearFix none " id="commonsPage">
                   			</div>
                      </c:if> 
                     <c:if test="${not empty requestScope.main}"> 
                    		 <div class="no-data none" id="noDataImg">
                             <img src="${resourcePath}/images/pig/no-data.png" alt=""/>
                        	</div>  
                           	<div class="paging-footer clearFix " id="commonsPage">
                   			</div>
                    </c:if> 
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 详情开始 -->
<div id="track" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<input type="hidden" id="trackTaskId"/>
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
        <h3 class="PopupTitle">任务详情</h3>
    </div>
    <div class="modal-body">
    	<div class="Popup" >
   		 	<div class="sel w410">
                   <span class="nn3">检测任务名称:</span>
                   <input type="text" readonly="readonly" class="input-name bg-grey" id="trackName"/>
            </div>
    	</div>
        
        <div class="Popup" >
   		 	<div class="sel w410">
                   <span class="nn3">管道名称:</span>
                   <input type="text" readonly="readonly" class="input-name bg-grey" id="trackPipeLineName"/>
            </div>
    	</div>
        <div style="clear:both"></div>
        <div class="Popup" >
   		 	<div class="sel w410">
                   <span class="nn3">发球点:</span>
                   <input type="text" readonly="readonly" class="input-name bg-grey" id="trackFromPig"/>
            </div>
    	</div>
    	<div class="Popup" >
   		 	<div class="sel w410">
                   <span class="nn3">收球点:</span>
                   <input type="text" readonly="readonly" class="input-name bg-grey" id="trackToPig"/>
            </div>
    	</div>
        <div style="clear:both"></div>
        <div class="Popup" >
   		 	<div class="sel w410">
                   <span class="nn3">检测工具:</span>
                   <input type="text" readonly="readonly" class="input-name bg-grey" id="trackTool"/>
            </div>
    	</div>
   	    
        <div style="clear:both"></div>
        <p class="p-t01">跟踪点:</p>
        <div id="trackPointDiv">
        
        </div>
    </div>
</div>
<!-- 详情结束 -->

<input type="hidden" id="taskNameHiddenId" value="" />
<input type="hidden" id="lineHiddenId" value="" />
<input type="hidden" id="segmentHiddenId" value="" />
<input type="hidden" id="begTimeHiddenId" value="" />
<input type="hidden" id="endTimeHiddenId" value="" />

</body>
<script>
var map={"current":1,"pageCount":10,"totalSize":"${pageTotal}","fillDiv":"#searchBody",
        "url":"${pageContext.request.contextPath}/insp/inspTaskHistory/findByCondition.json"};
commonPages(map);
</script>
<script src="${resourcePath}js/comm/base_v3.0.js"></script>
</html>